Cacthing hosts

Cacthing hosts

am 26.02.2010 17:57:20 von Nilesh Govindrajan

--00504502f6811a61fa048083cc29
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have two domains, example.net and example.com

*.example.net & *.example.com point to the server's IP (Wildcard CNAME).

Now only some subdomains like www, img, etc. are defined on both domains.

I want to catch all other subdomains not configured and raise a 404 error.

How to ?

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--00504502f6811a61fa048083cc29
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

I have two domains, example.net a> and

*.
ttp://example.net">example.net & *.e=
xample.com
point to the server's IP (Wildcard CNAME).



Now only some subdomains like www, img, etc. are defined on both domain=
s.

I want to catch all other subdomains not configured and raise a 4=
04 error.

How to ?

--
Nilesh Govindarajan r>

Site & Server Administrator
www.it=
ech7.com




--00504502f6811a61fa048083cc29--

Re: Cacthing hosts

am 26.02.2010 18:06:20 von Rich Bowen

--Apple-Mail-2--1013512279
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii


On Feb 26, 2010, at 11:57 AM, Nilesh Govindarajan wrote:

> Hi,
>=20
> I have two domains, example.net and example.com
>=20
> *.example.net & *.example.com point to the server's IP (Wildcard =
CNAME).
>=20
> Now only some subdomains like www, img, etc. are defined on both =
domains.
>=20
> I want to catch all other subdomains not configured and raise a 404 =
error.
>=20
> How to ?

You'll need two virtual hosts - one for the "good" hostnames, identified =
with ServerAlias directive(s). Another for everything else, identified =
with ServerAlias *.example.com



--Apple-Mail-2--1013512279
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii


On Feb 26, 2010, at 11:57 AM, Nilesh Govindarajan wrote:

Hi,

I have two domains, point to the server's IP (Wildcard CNAME).



Now only some subdomains like www, img, etc. are defined on both domains.

I want to catch all other subdomains not configured and raise a 404 error.

How to ?

You'll need two virtual hosts - one for the "good" hostnames, identified with ServerAlias directive(s). Another for everything else, identified with ServerAlias *.example.com



--Apple-Mail-2--1013512279--

Re: Cacthing hosts

am 26.02.2010 18:12:58 von Tom Evans

On Fri, Feb 26, 2010 at 4:57 PM, Nilesh Govindarajan wrote:
> Hi,
>
> I have two domains, example.net and example.com
>
> *.example.net & *.example.com point to the server's IP (Wildcard CNAME).
>
> Now only some subdomains like www, img, etc. are defined on both domains.
>
> I want to catch all other subdomains not configured and raise a 404 error.
>
> How to ?
>
> --
> Nilesh Govindarajan
> Site & Server Administrator
> www.itech7.com
>
>

I don't know about 404, but you can have them raise a 403 easily enough:


ServerName www.example.com



ServerName *.example.com
RewriteEngine On
RewriteRule ^ - [F]


Cheers

Tom

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Cacthing hosts

am 26.02.2010 18:19:35 von Nilesh Govindrajan

--0050450140c4adcda10480841bbf
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Feb 26, 2010 at 10:42 PM, Tom Evans wrote:

> On Fri, Feb 26, 2010 at 4:57 PM, Nilesh Govindarajan
> wrote:
> > Hi,
> >
> > I have two domains, example.net and example.com
> >
> > *.example.net & *.example.com point to the server's IP (Wildcard CNAME).
> >
> > Now only some subdomains like www, img, etc. are defined on both domains.
> >
> > I want to catch all other subdomains not configured and raise a 404
> error.
> >
> > How to ?
> >
> > --
> > Nilesh Govindarajan
> > Site & Server Administrator
> > www.itech7.com
> >
> >
>
> I don't know about 404, but you can have them raise a 403 easily enough:
>
>
> ServerName www.example.com
>

>
>
> ServerName *.example.com
> RewriteEngine On
> RewriteRule ^ - [F]
>

>
> Cheers
>
> Tom
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Thanks all. Got it.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--0050450140c4adcda10480841bbf
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 26, 2010 at 10:42 PM, Tom Evans n dir=3D"ltr"><@ p://googlemail.com">googlemail.com> wrote:
ss=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px sol=
id rgb(204, 204, 204); padding-left: 1ex;">

On Fri, Feb 26, 2010 at 4:57 PM, Nilesh G=
ovindarajan <>=
; wrote:

> Hi,

>

> I have two domains, e=
xample.net
and example=
..com


>

> *. &am=
p; *. point=
to the server's IP (Wildcard CNAME).

>

> Now only some subdomains like www, img, etc. are defined on both domai=
ns.

>

> I want to catch all other subdomains not configured and raise a 404 er=
ror.

>

> How to ?

>

> --

> Nilesh Govindarajan

> Site & Server Administrator

> =


>

>



I don't know about 404, but you can have them raise a 403 e=
asily enough:



<VirtualHost *:80>

=A0ServerName www.exa=
mple.com


</VirtualHost>



<VirtualHost *:80>

=A0ServerName *.example.c=
om


=A0RewriteEngine On

=A0RewriteRule ^ - [F]

</VirtualHost>



Cheers



Tom



------------------------------------------------------------ ---------

The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL: lank">http://httpd.apache.org/userslist.html> for more info.

To unsubscribe, e-mail: g">users-unsubscribe@httpd.apache.org

=A0 " =A0 from the digest: @httpd.apache.org">users-digest-unsubscribe@httpd.apache.org

For additional commands, e-mail: org">users-help@httpd.apache.org




Thanks all. Got it.

--
Nilesh Govindaraja=
n
Site & Server Administrator
w=
ww.itech7.com




--0050450140c4adcda10480841bbf--

Re: Cacthing hosts

am 26.02.2010 18:22:49 von Frank Gingras

On 02/26/2010 12:12 PM, Tom Evans wrote:
> On Fri, Feb 26, 2010 at 4:57 PM, Nilesh Govindarajan wrote:
>> Hi,
>>
>> I have two domains, example.net and example.com
>>
>> *.example.net& *.example.com point to the server's IP (Wildcard CNAME).
>>
>> Now only some subdomains like www, img, etc. are defined on both domains.
>>
>> I want to catch all other subdomains not configured and raise a 404 error.
>>
>> How to ?
>>
>> --
>> Nilesh Govindarajan
>> Site& Server Administrator
>> www.itech7.com
>>
>>
>
> I don't know about 404, but you can have them raise a 403 easily enough:
>
>
> ServerName www.example.com
>

>
>
> ServerName *.example.com
> RewriteEngine On
> RewriteRule ^ - [F]
>

>
> Cheers
>
> Tom
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Tom,

Note that using a wildcard with ServerName is not recommended. If you
want to define a dummy catch-all vhost, you should place it first, and
set the ServerName to another value like your IP or a dummy name.

Frank.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Cacthing hosts

am 27.02.2010 12:20:05 von Nilesh Govindrajan

--0016e68ddac7d798980480933380
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Feb 26, 2010 at 10:52 PM, Frank Gingras
wrote:

>
>
> On 02/26/2010 12:12 PM, Tom Evans wrote:
>
>> On Fri, Feb 26, 2010 at 4:57 PM, Nilesh Govindarajan
>> wrote:
>>
>>> Hi,
>>>
>>> I have two domains, example.net and example.com
>>>
>>> *.example.net& *.example.com point to the server's IP (Wildcard CNAME).
>>>
>>> Now only some subdomains like www, img, etc. are defined on both domains.
>>>
>>> I want to catch all other subdomains not configured and raise a 404
>>> error.
>>>
>>> How to ?
>>>
>>> --
>>> Nilesh Govindarajan
>>> Site& Server Administrator
>>> www.itech7.com
>>>
>>>
>>>
>> I don't know about 404, but you can have them raise a 403 easily enough:
>>
>>
>> ServerName www.example.com
>>

>>
>>
>> ServerName *.example.com
>> RewriteEngine On
>> RewriteRule ^ - [F]
>>

>>
>> Cheers
>>
>> Tom
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
> Tom,
>
> Note that using a wildcard with ServerName is not recommended. If you want
> to define a dummy catch-all vhost, you should place it first, and set the
> ServerName to another value like your IP or a dummy name.
>
> Frank.
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Though I've got it, I have a doubt. I'm using this config -


ServerAlias *.example.com *.example.net
RedirectMatch 400 ^/(.*)$


This configuration has to be placed after all good vhosts; Otherwise all
hosts give Error 400. Why ?

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--0016e68ddac7d798980480933380
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 26, 2010 at 10:52 PM, Frank Gingras =
<francoi=
s.gingras@gmail.com
>
wrote:
te" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204=
, 204); padding-left: 1ex;">





On 02/26/2010 12:12 PM, Tom Evans wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Fri, Feb 26, 2010 at 4:57 PM, Nilesh Govindarajan< ists@itech7.com" target=3D"_blank">lists@itech7.com> =A0wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,



I have two domains, exampl=
e.net
and example.com<=
/a>



*.& =A0=
*. point to=
the server's IP (Wildcard CNAME).



Now only some subdomains like www, img, etc. are defined on both domains. r>


I want to catch all other subdomains not configured and raise a 404 error.<=
br>


How to ?



--

Nilesh Govindarajan

Site& =A0Server Administrator










I don't know about 404, but you can have them raise a 403 easily enough=
:



<VirtualHost *:80>

=A0 ServerName
www.ex=
ample.com


</VirtualHost>



<VirtualHost *:80>

=A0 ServerName *.example.=
com


=A0 RewriteEngine On

=A0 RewriteRule ^ - [F]

</VirtualHost>



Cheers



Tom



------------------------------------------------------------ ---------

The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See<URL: ank">http://httpd.apache.org/userslist.html> =A0for more info.

To unsubscribe, e-mail: g" target=3D"_blank">users-unsubscribe@httpd.apache.org

=A0 =A0" =A0 from the digest: ibe@httpd.apache.org" target=3D"_blank">users-digest-unsubscribe@httpd.apac=
he.org


For additional commands, e-mail: org" target=3D"_blank">users-help@httpd.apache.org






Tom,



Note that using a wildcard with ServerName is not recommended. If you want =
to define a dummy catch-all vhost, you should place it first, and set the S=
erverName to another value like your IP or a dummy name.
#888888">


Frank.




------------------------------------------------------------ ---------

The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL: lank">http://httpd.apache.org/userslist.html> for more info.

To unsubscribe, e-mail: g" target=3D"_blank">users-unsubscribe@httpd.apache.org

=A0" =A0 from the digest: httpd.apache.org" target=3D"_blank">users-digest-unsubscribe@httpd.apache.o=
rg


For additional commands, e-mail: org" target=3D"_blank">users-help@httpd.apache.org




Though I've got it, I have a doubt. =
I'm using this config -

<VirtualHost *:80>
ServerAlias =
*. *. e.net">example.net


RedirectMatch 400 ^/(.*)$
</VirtualHost>

This configuration=
has to be placed after all good vhosts; Otherwise all hosts give Error 400=
.. Why ?

--
Nilesh Govindarajan
Site & Serve=
r Administrator






--0016e68ddac7d798980480933380--

Re: Cacthing hosts

am 27.02.2010 17:01:07 von LuKreme

On 27-Feb-2010, at 04:20, Nilesh Govindarajan wrote:
>=20
> This configuration has to be placed after all good vhosts; Otherwise =
all
> hosts give Error 400. Why ?

Because all hosts match.

This is not the best way to do it, wildcards are discouraged.

As Frank said:

On 26-Feb-2010, at 10:22, Frank Gingras wrote:
> If you want to define a dummy catch-all vhost, you should place it =
first, and set the ServerName to another value like your IP or a dummy =
name.

First Virtual Host:

Servername 12.34.56.789
RedirectMatch 400 ^/.*


then put the real virtual hosts you want to define down here


Servername www.example.com
DocumentRoot /path/to/example.com



Servername www.example.net
DocumentRoot /path/to/example.net



The servername in your dummy can be something else. dummy.example.com, =
for example, but making it the IP address is probably a good choice.

--=20
"You're just impressed by any pretty girl who can walk and talk."
"She doesn't have to talk."


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Re: Cacthing hosts

am 27.02.2010 18:17:11 von Nilesh Govindrajan

--0016e6475672ed7b9f048098305a
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Feb 27, 2010 at 9:31 PM, LuKreme wrote:

> On 27-Feb-2010, at 04:20, Nilesh Govindarajan wrote:
> >
> > This configuration has to be placed after all good vhosts; Otherwise all
> > hosts give Error 400. Why ?
>
> Because all hosts match.
>
> This is not the best way to do it, wildcards are discouraged.
>
> As Frank said:
>
> On 26-Feb-2010, at 10:22, Frank Gingras wrote:
> > If you want to define a dummy catch-all vhost, you should place it first,
> and set the ServerName to another value like your IP or a dummy name.
>
> First Virtual Host:
>
> Servername 12.34.56.789
> RedirectMatch 400 ^/.*
>

>
> then put the real virtual hosts you want to define down here
>
>
> Servername www.example.com
> DocumentRoot /path/to/example.com
>

>
>
> Servername www.example.net
> DocumentRoot /path/to/example.net
>

>
>
> The servername in your dummy can be something else. dummy.example.com, for
> example, but making it the IP address is probably a good choice.
>
> --
> "You're just impressed by any pretty girl who can walk and talk."
> "She doesn't have to talk."
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
What if I want all IPs ?

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--0016e6475672ed7b9f048098305a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Feb 27, 2010 at 9:31 PM, LuKreme ir=3D"ltr"><&g=
t;
wrote:
0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex=
;">

On 27-Feb-2010, at 04:20, Nilesh Govindarajan wrote:

>

> This configuration has to be placed after all good vhosts; Otherwise a=
ll

> hosts give Error 400. Why ?



Because all hosts match.



This is not the best way to do it, wildcards are discouraged.



As Frank said:



On 26-Feb-2010, at 10:22, Frank Gingras wrote:

> If you want to define a dummy catch-all vhost, you should place it fir=
st, and set the ServerName to another value like your IP or a dummy name. r>


First Virtual Host:

<VirtualHost *>

=A0Servername 12.34.56.789

=A0RedirectMatch 400 ^/.*

</virtualhost>



then put the real virtual hosts you want to define down here



<virtualhost *>

=A0Servername www.exa=
mple.com


=A0DocumentRoot /path/to/=
example.com


</virtualhost>



<virtualhost *>

=A0Servername www.exa=
mple.net


=A0DocumentRoot /path/to/=
example.net


</virtualhost>





The servername in your dummy can be something else. ..example.com" target=3D"_blank">dummy.example.com, for example, but mak=
ing it the IP address is probably a good choice.



--

"You're just impressed by any pretty girl who can walk and talk.&q=
uot;

"She doesn't have to talk."





------------------------------------------------------------ ---------

The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL: lank">http://httpd.apache.org/userslist.html> for more info.

To unsubscribe, e-mail: g">users-unsubscribe@httpd.apache.org

=A0 " =A0 from the digest: @httpd.apache.org">users-digest-unsubscribe@httpd.apache.org

For additional commands, e-mail: org">users-help@httpd.apache.org




What if I want all IPs ?
">
--
Nilesh Govindarajan
Site & Server Administrator
ref=3D"http://www.itech7.com">www.itech7.com



--0016e6475672ed7b9f048098305a--

Re: Cacthing hosts

am 27.02.2010 20:31:08 von LuKreme

On 27-Feb-2010, at 10:17, Nilesh Govindarajan wrote:
>=20
> What if I want all IPs ?

Your not understanding the function of the first VirtualHost. It is =
special as it is the default for anything that doesn't match another =
VirtualHost.

What I posted will do what you want. Request to www.example.com will go =
to the example.com dir, www.example.net will go to the example.net dir, =
*everything*else* that reaches your server will go to the 400 error =
VirtualHost.

And I do mean *everything*

--=20
'I think, if you want thousands, you've got to fight for one.' --Small =
Gods


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Re: Cacthing hosts

am 28.02.2010 11:13:05 von Nilesh Govindrajan

--0016e68ee0391194de0480a6627f
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Feb 28, 2010 at 1:01 AM, LuKreme wrote:

> On 27-Feb-2010, at 10:17, Nilesh Govindarajan wrote:
> >
> > What if I want all IPs ?
>
> Your not understanding the function of the first VirtualHost. It is special
> as it is the default for anything that doesn't match another VirtualHost.
>
> What I posted will do what you want. Request to www.example.com will go to
> the example.com dir, www.example.net will go to the example.net dir,
> *everything*else* that reaches your server will go to the 400 error
> VirtualHost.
>
> And I do mean *everything*
>
> --
> 'I think, if you want thousands, you've got to fight for one.' --Small Gods
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
You posted which will work for a single IP i.e. 12.34.56.789

But what if I have three or four IP addresses on the same Apache server ?

Your config will handle only that particular IP.

I think a solution is ServerAlias ?

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

--0016e68ee0391194de0480a6627f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sun, Feb 28, 2010 at 1:01 AM, LuKreme ir=3D"ltr"><&g=
t;
wrote:
0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex=
;">

On 27-Feb-2010, at 10:17, Nilesh Govindarajan wrote:

>

> What if I want all IPs ?



Your not understanding the function of the first VirtualHost. It is s=
pecial as it is the default for anything that doesn't match another Vir=
tualHost.



What I posted will do what you want. Request to le.com" target=3D"_blank">www.example.com will go to the p://example.com" target=3D"_blank">example.com dir, ww.example.net" target=3D"_blank">www.example.net will go to the f=3D"http://example.net" target=3D"_blank">example.net dir, *everything=
*else* that reaches your server will go to the 400 error VirtualHost.





And I do mean *everything*



--

'I think, if you want thousands, you've got to fight for one.' =
--Small Gods





------------------------------------------------------------ ---------

The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL: lank">http://httpd.apache.org/userslist.html> for more info.

To unsubscribe, e-mail: g">users-unsubscribe@httpd.apache.org

=A0 " =A0 from the digest: @httpd.apache.org">users-digest-unsubscribe@httpd.apache.org

For additional commands, e-mail: org">users-help@httpd.apache.org




You posted which will work for a single =
IP i.e. 12.34.56.789

But what if I have three or four IP addresses o=
n the same Apache server ?

Your config will handle only that particu=
lar IP.



I think a solution is ServerAlias ?

--
Nilesh =
Govindarajan
Site & Server Administrator
ech7.com">www.itech7.com



--0016e68ee0391194de0480a6627f--

Re: Re: Cacthing hosts

am 28.02.2010 13:34:28 von Eric Covener

On Sun, Feb 28, 2010 at 5:13 AM, Nilesh Govindarajan wrote:

> You posted which will work for a single IP i.e. 12.34.56.789
>
> But what if I have three or four IP addresses on the same Apache server ?
>
> Your config will handle only that particular IP.
>
> I think a solution is ServerAlias ?

Not necessary. When you create a set of name-based virtualhosts (1
NameVirtualHost X, N ), the first one you list is the
default for that set.

--
Eric Covener
covener@gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Cacthing hosts

am 28.02.2010 15:16:51 von LuKreme

On 28-Feb-10 03:13, Nilesh Govindarajan wrote:
> On Sun, Feb 28, 2010 at 1:01 AM, LuKreme wrote:
>> On 27-Feb-2010, at 10:17, Nilesh Govindarajan wrote:
>>> What if I want all IPs ?
>>
>> What I posted will do what you want. Request to www.example.com will go to
>> the example.com dir, www.example.net will go to the example.net dir,
>> *everything*else* that reaches your server will go to the 400 error
>> VirtualHost.
>>
>> And I do mean *everything*

> You posted which will work for a single IP i.e. 12.34.56.789

No, you're not listening. EVERY REQUEST THAT MAKES IT TO APACHE and is
NOT www.example.com or www.example.net will hit the first VirtualHost.

This is why I said *EVERYTHING*ELSE*

> But what if I have three or four IP addresses on the same Apache server ?

As long as apache is listening to thoes IPs it makes no difference.

> Your config will handle only that particular IP.

No, it won't. It would handle every single IP on the Internet if they
all pointed at your apache install.


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

memory problems, I lose control of the entire server

am 28.02.2010 18:24:00 von Alvise Nicoletti

Hi.
I searched help from several months ago with no success.
So I'll repeat again my problem hoping that this time someone will answer.

I often (3 times in a month) control of my virtual server, so I have to
call the provider to soft-reset it.
The problem is that apache takes all the memory and the cpu usage of the
server, and sometimes after that I have also kernel panic errors.

Even with the server working, I have the apache2 daemons big from 30 to
50 megabytes each one (now I use 9).


In the logs I found stuff like this:
Feb 28 12:54:09 utopia kernel: [408986.594006] apache2 invoked
oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
Feb 28 12:54:09 utopia kernel: [408986.594022] Pid: 6817, comm: apache2
Not tainted 2.6.28-18-server #59-Ubuntu
Feb 28 12:54:09 utopia kernel: [408986.594026] Call Trace:
Feb 28 12:54:09 utopia kernel: [408986.594080] []
oom_kill_process+0x95/0x240
Feb 28 12:54:09 utopia kernel: [408986.594087] [] ?
select_bad_process+0xef/0x130
Feb 28 12:54:09 utopia kernel: [408986.594091] []
out_of_memory+0xb4/0x150
Feb 28 12:54:09 utopia kernel: [408986.594095] []
__alloc_pages_internal+0x4a9/0x4f0
Feb 28 12:54:09 utopia kernel: [408986.594101] []
__do_page_cache_readahead+0xda/0x210
Feb 28 12:54:09 utopia kernel: [408986.594105] []
do_page_cache_readahead+0x5e/0x90
Feb 28 12:54:09 utopia kernel: [408986.594108] []
filemap_fault+0x34a/0x430
Feb 28 12:54:09 utopia kernel: [408986.594113] []
__do_fault+0x50/0x520
Feb 28 12:54:09 utopia kernel: [408986.594117] []
handle_mm_fault+0x1e9/0x470
Feb 28 12:54:09 utopia kernel: [408986.594134] [] ?
path_walk+0xbf/0xd0
Feb 28 12:54:09 utopia kernel: [408986.594158] [] ?
default_spin_lock_flags+0x9/0x10
Feb 28 12:54:09 utopia kernel: [408986.594177] []
do_page_fault+0x307/0x780
Feb 28 12:54:09 utopia kernel: [408986.594183] [] ?
cp_new_stat+0xe3/0xf0
Feb 28 12:54:09 utopia kernel: [408986.594186] [] ?
sys_newstat+0x36/0x50
Feb 28 12:54:09 utopia kernel: [408986.594198] []
error_exit+0x0/0x70
Feb 28 12:54:09 utopia kernel: [408986.594202] Mem-Info:
Feb 28 12:54:09 utopia kernel: [408986.594205] DMA per-cpu:
Feb 28 12:54:09 utopia kernel: [408986.594207] CPU 0: hi: 0,
btch: 1 usd: 0
Feb 28 12:54:09 utopia kernel: [408986.594210] CPU 1: hi: 0,
btch: 1 usd: 0
Feb 28 12:54:09 utopia kernel: [408986.594212] DMA32 per-cpu:
Feb 28 12:54:09 utopia kernel: [408986.594214] CPU 0: hi: 186,
btch: 31 usd: 183
Feb 28 12:54:09 utopia kernel: [408986.594216] CPU 1: hi: 186,
btch: 31 usd: 172
Feb 28 12:54:09 utopia kernel: [408986.594226] Active_anon:363780
active_file:19 inactive_anon:121250
Feb 28 12:54:09 utopia kernel: [408986.594228] inactive_file:91
unevictable:0 dirty:0 writeback:0 unstable:0
Feb 28 12:54:09 utopia kernel: [408986.594229] free:3066 slab:4774
mapped:1 pagetables:7473 bounce:0
Feb 28 12:54:09 utopia kernel: [408986.594234] DMA free:6644kB min:12kB
low:12kB high:16kB active_anon:0kB inactive_anon:0kB acti$
Feb 28 12:54:09 utopia kernel: [408986.594237] lowmem_reserve[]: 0 2004
2004 2004
Feb 28 12:54:09 utopia kernel: [408986.594244] DMA32 free:5620kB
min:5720kB low:7148kB high:8580kB active_anon:1455120kB inactive$
Feb 28 12:54:09 utopia kernel: [408986.594247] lowmem_reserve[]: 0 0 0 0
Feb 28 12:54:09 utopia kernel: [408986.594259] DMA: 3*4kB 3*8kB 3*16kB
3*32kB 3*64kB 1*128kB 2*256kB 1*512kB 1*1024kB 0*2048kB 1*$
Feb 28 12:54:09 utopia kernel: [408986.594272] DMA32: 155*4kB 1*8kB
0*16kB 0*32kB 0*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 0*2048k$
Feb 28 12:54:09 utopia kernel: [408986.594284] 828 total pagecache pages
Feb 28 12:54:09 utopia kernel: [408986.594286] 0 pages in swap cache
Feb 28 12:54:09 utopia kernel: [408986.594288] Swap cache stats: add
4551, delete 4551, find 160864/160937
Feb 28 12:54:09 utopia kernel: [408986.594297] Free swap = 0kB
Feb 28 12:54:09 utopia kernel: [408986.594299] Total swap = 0kB
Feb 28 12:54:09 utopia kernel: [408986.608274] 524272 pages RAM
Feb 28 12:54:09 utopia kernel: [408986.608283] 15596 pages reserved
Feb 28 12:54:09 utopia kernel: [408986.608284] 63040 pages shared
Feb 28 12:54:09 utopia kernel: [408986.608286] 500299 pages non-shared
Feb 28 12:54:09 utopia kernel: [408986.608292] Out of memory: kill
process 6817 (apache2) score 63892 or a child
Feb 28 12:54:09 utopia kernel: [408986.609426] Killed process 6817 (apache2)
Feb 28 12:54:17 utopia kernel: [409094.110911] pickup invoked
oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
Feb 28 12:54:17 utopia kernel: [409094.110925] Pid: 5668, comm: pickup
Not tainted 2.6.28-18-server #59-Ubuntu
Feb 28 12:54:17 utopia kernel: [409094.110929] Call Trace:
(and so on)

This is my configuration:
Linux utopia 2.6.28-18-server #59-Ubuntu SMP Thu Jan 28 02:25:03 UTC
2010 x86_64 GNU/Linux
Server version: Apache/2.2.11 (Ubuntu)
Server built: Nov 13 2009 22:06:57
Server's Module Magic Number: 20051115:21
Server loaded: APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

This is the main configuration of apache2:

StartServers 5
MinSpareServers 5
MaxSpareServers 9
MaxClients 80
MaxRequestsPerChild 400
MaxMemFree 200000


KeepAliveTimeout 3
MaxKeepAliveRequests 50
KeepAlive On
Timeout 200

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: memory problems, I lose control of the entire

am 01.03.2010 13:19:54 von Tom Evans

On Sun, Feb 28, 2010 at 5:24 PM, Alvise Nicoletti
wrote:
> Hi.
> I searched help from several months ago with no success.
> So I'll repeat again my problem hoping that this time someone will answer=
..
>
> I often (3 times in a month) control of my virtual server, so I have to c=
all
> the provider to soft-reset it.
> The problem is that apache takes all the memory and the cpu usage of the
> server, and sometimes after that I have also kernel panic errors.
>
> Even with the server working, I have the apache2 daemons big from 30 to 5=
0
> megabytes each one (now I use 9).
>
>
> In the logs I found stuff like this:
> Feb 28 12:54:09 utopia kernel: [408986.594006] apache2 invoked oom-killer=
:
> gfp_mask=3D0x1201d2, order=3D0, oomkilladj=3D0
> Feb 28 12:54:09 utopia kernel: [408986.594022] Pid: 6817, comm: apache2 N=
ot
> tainted 2.6.28-18-server #59-Ubuntu
> Feb 28 12:54:09 utopia kernel: [408986.594026] Call Trace:
> Feb 28 12:54:09 utopia kernel: [408986.594080]  []
> oom_kill_process+0x95/0x240
> Feb 28 12:54:09 utopia kernel: [408986.594087]  []=
?
> select_bad_process+0xef/0x130
> Feb 28 12:54:09 utopia kernel: [408986.594091]  []
> out_of_memory+0xb4/0x150
> Feb 28 12:54:09 utopia kernel: [408986.594095]  []
> __alloc_pages_internal+0x4a9/0x4f0
> Feb 28 12:54:09 utopia kernel: [408986.594101]  []
> __do_page_cache_readahead+0xda/0x210
> Feb 28 12:54:09 utopia kernel: [408986.594105]  []
> do_page_cache_readahead+0x5e/0x90
> Feb 28 12:54:09 utopia kernel: [408986.594108]  []
> filemap_fault+0x34a/0x430
> Feb 28 12:54:09 utopia kernel: [408986.594113]  []
> __do_fault+0x50/0x520
> Feb 28 12:54:09 utopia kernel: [408986.594117]  []
> handle_mm_fault+0x1e9/0x470
> Feb 28 12:54:09 utopia kernel: [408986.594134]  []=
?
> path_walk+0xbf/0xd0
> Feb 28 12:54:09 utopia kernel: [408986.594158]  []=
?
> default_spin_lock_flags+0x9/0x10
> Feb 28 12:54:09 utopia kernel: [408986.594177]  []
> do_page_fault+0x307/0x780
> Feb 28 12:54:09 utopia kernel: [408986.594183]  []=
?
> cp_new_stat+0xe3/0xf0
> Feb 28 12:54:09 utopia kernel: [408986.594186]  []=
?
> sys_newstat+0x36/0x50
> Feb 28 12:54:09 utopia kernel: [408986.594198]  []
> error_exit+0x0/0x70
> Feb 28 12:54:09 utopia kernel: [408986.594202] Mem-Info:
> Feb 28 12:54:09 utopia kernel: [408986.594205] DMA per-cpu:
> Feb 28 12:54:09 utopia kernel: [408986.594207] CPU    0: hi: =
   0, btch:   1
> usd:   0
> Feb 28 12:54:09 utopia kernel: [408986.594210] CPU    1: hi: =
   0, btch:   1
> usd:   0
> Feb 28 12:54:09 utopia kernel: [408986.594212] DMA32 per-cpu:
> Feb 28 12:54:09 utopia kernel: [408986.594214] CPU    0: hi: =
 186, btch:  31
> usd: 183
> Feb 28 12:54:09 utopia kernel: [408986.594216] CPU    1: hi: =
 186, btch:  31
> usd: 172
> Feb 28 12:54:09 utopia kernel: [408986.594226] Active_anon:363780
> active_file:19 inactive_anon:121250
> Feb 28 12:54:09 utopia kernel: [408986.594228]  inactive_file:91
> unevictable:0 dirty:0 writeback:0 unstable:0
> Feb 28 12:54:09 utopia kernel: [408986.594229]  free:3066 slab:4774 =
mapped:1
> pagetables:7473 bounce:0
> Feb 28 12:54:09 utopia kernel: [408986.594234] DMA free:6644kB min:12kB
> low:12kB high:16kB active_anon:0kB inactive_anon:0kB acti$
> Feb 28 12:54:09 utopia kernel: [408986.594237] lowmem_reserve[]: 0 2004 2=
004
> 2004
> Feb 28 12:54:09 utopia kernel: [408986.594244] DMA32 free:5620kB min:5720=
kB
> low:7148kB high:8580kB active_anon:1455120kB inactive$
> Feb 28 12:54:09 utopia kernel: [408986.594247] lowmem_reserve[]: 0 0 0 0
> Feb 28 12:54:09 utopia kernel: [408986.594259] DMA: 3*4kB 3*8kB 3*16kB
> 3*32kB 3*64kB 1*128kB 2*256kB 1*512kB 1*1024kB 0*2048kB 1*$
> Feb 28 12:54:09 utopia kernel: [408986.594272] DMA32: 155*4kB 1*8kB 0*16k=
B
> 0*32kB 0*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 0*2048k$
> Feb 28 12:54:09 utopia kernel: [408986.594284] 828 total pagecache pages
> Feb 28 12:54:09 utopia kernel: [408986.594286] 0 pages in swap cache
> Feb 28 12:54:09 utopia kernel: [408986.594288] Swap cache stats: add 4551=
,
> delete 4551, find 160864/160937
> Feb 28 12:54:09 utopia kernel: [408986.594297] Free swap  =3D 0kB
> Feb 28 12:54:09 utopia kernel: [408986.594299] Total swap =3D 0kB
> Feb 28 12:54:09 utopia kernel: [408986.608274] 524272 pages RAM
> Feb 28 12:54:09 utopia kernel: [408986.608283] 15596 pages reserved
> Feb 28 12:54:09 utopia kernel: [408986.608284] 63040 pages shared
> Feb 28 12:54:09 utopia kernel: [408986.608286] 500299 pages non-shared
> Feb 28 12:54:09 utopia kernel: [408986.608292] Out of memory: kill proces=
s
> 6817 (apache2) score 63892 or a child
> Feb 28 12:54:09 utopia kernel: [408986.609426] Killed process 6817 (apach=
e2)
> Feb 28 12:54:17 utopia kernel: [409094.110911] pickup invoked oom-killer:
> gfp_mask=3D0x1201d2, order=3D0, oomkilladj=3D0
> Feb 28 12:54:17 utopia kernel: [409094.110925] Pid: 5668, comm: pickup No=
t
> tainted 2.6.28-18-server #59-Ubuntu
> Feb 28 12:54:17 utopia kernel: [409094.110929] Call Trace:
> (and so on)
>
> This is my configuration:
> Linux utopia 2.6.28-18-server #59-Ubuntu SMP Thu Jan 28 02:25:03 UTC 2010
> x86_64 GNU/Linux
> Server version: Apache/2.2.11 (Ubuntu)
> Server built:   Nov 13 2009 22:06:57
> Server's Module Magic Number: 20051115:21
> Server loaded:  APR 1.2.12, APR-Util 1.2.12
> Compiled using: APR 1.2.12, APR-Util 1.2.12
> Architecture:   64-bit
> Server MPM:     Prefork
>  threaded:     no
>   forked:     yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR=3D"server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=3D128
> -D HTTPD_ROOT=3D""
> -D SUEXEC_BIN=3D"/usr/lib/apache2/suexec"
> -D DEFAULT_PIDLOG=3D"/var/run/apache2.pid"
> -D DEFAULT_SCOREBOARD=3D"logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE=3D"/var/run/apache2/accept.lock"
> -D DEFAULT_ERRORLOG=3D"logs/error_log"
> -D AP_TYPES_CONFIG_FILE=3D"/etc/apache2/mime.types"
> -D SERVER_CONFIG_FILE=3D"/etc/apache2/apache2.conf"
>
> This is the main configuration of apache2:
>
>   StartServers          5
>   MinSpareServers       5
>   MaxSpareServers      9
>   MaxClients          80
>   MaxRequestsPerChild   400
>   MaxMemFree  200000
>

>
> KeepAliveTimeout 3
> MaxKeepAliveRequests 50
> KeepAlive On
> Timeout 200
>

Add more memory/reduce number of clients/disable KeepAlive.

30-50 MB per child sounds large, unless you are using PHP, in which
case it sounds about right.

You also seem to allow a very large number of children - MaxClients
80. If you are running out of memory, and can't add any more, don't
configure apache so that it can use 2.4 GB - 4 GB of RAM.

KeepAlive is good for clients, less good for pre-fork webservers
consuming lots of resources. Each client you KeepAlive adds one more
unusable child, another 30-50MB of memory used.

Cheers

Tom

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Apache 2.2 optimization -> Three tips

am 22.03.2010 09:34:40 von Geoff Millikan

------=_NextPart_000_00BA_01CAC95F.D7811EC0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Here's three things I wish I had read about Apache optimization that are not
commonly discussed (we found out by years of trial and error). These three
settings are worth more than all the other optimization we've done (e.g.
SendBufferSize, AcceptFilter http data, EnableMMAP On, EnableSendfile On,
eliminating all .htaccess files, etc.)

1. Set your KeepAliveTimeout to 3 seconds or less.

2. Turn off atime "accesss time" by using noatime. Do it in real time with
*something like* the command line below. This will make it so you only have
to read the file off the disk instead of doing both a read (to get the data)
then a write to update the access time.

shell> mount -o noatime,remount,rw /

To make the noatime setting last between reboots edit your fstab and modify
this line:
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
To read *something like* to like this:
/dev/VolGroup00/LogVol00 / ext3 defaults,noatime
1 1

3. Increase your StartServers to the number of maximum requests on your
biggest page. For example, if your busiest page requires 30 hits/requests
to load all the images, css, javascript, etc then if you have the RAM to
support it, set your StartServers to 30 and your MinSpareServers to 30. To
know if you have the RAM to support it, run the command "top" and look for
the httpd process under the column "RES." That's the amount of physical RAM
the Apache process is taking up. On our server, each process take up about
12 megs of RAM. So having 30 Apache process running will takes up 360 megs
of RAM. Now use Firefox Firebug. Look at the time each item is in
"waiting." Before you increased StartServers you might see the first 10 or
20 items have a "waiting" time of 20 to 30 ms then the last 10 items have a
"waiting" time of 300 or 500ms or more. When you have enough processes
going, all the "waiting" times will be about the same. Don't raise your
StartServers above the amount of RAM available otherwise you'll swap which
I've read is very slow (you can tell by looking at the "top" output under
the row called "swap").

Money and premature optimization is the root of all evil.

Best,

http://www.t1shopper.com/


-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"The nine most terrifying words in the English language are: I'm from the
government and I'm here to help." - Ronald Reagan, August 21, 1986
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

------=_NextPart_000_00BA_01CAC95F.D7811EC0
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIIL4TCCAj0w
ggGmAhEAzbp/VvDf5LxU/iKss3KqVTANBgkqhkiG9w0BAQIFADBfMQswCQYD VQQGEwJVUzEXMBUG
A1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDEgUHVibGlj IFByaW1hcnkgQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNOTYwMTI5MDAwMDAwWhcNMjgwODAx MjM1OTU5WjBfMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT LkNsYXNzIDEgUHVi
bGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwgZ8wDQYJKoZI hvcNAQEBBQADgY0A
MIGJAoGBAOUZv22jVmEtmUhx9mfeuY3rt56GgAqRDvo4Ja9GiILlc6igmyRd DR/MZW4MsNBWhBiH
mgabEKFz37RYOWtuwfYV1aioP6oSBo0xrH+wNNePNGeICc0UEeJORVZpH3gC gNrcR5EpuzbJY1zF
4Ncth3uhtzKwezC6Ki8xqu6jZ9rbAgMBAAEwDQYJKoZIhvcNAQECBQADgYEA TD+4i8Zo3+5DMw5d
6abLB4RNejP/khv0Nq3YlSI2aBFsfELM85wuxAc/FLAPT/+Qknb54rxK6Y/N oIAK98Up8YIiXbix
3YEjo3slFUYweRb46gVLlH8dwhzI47f0EEA8E8NfH1PoSOSGtHuhNbB7Jbq4 046rPzidADQAmPPR
cZQwggTMMIIDtKADAgECAhArnCzh/Ksu0zIdyROBbf1BMA0GCSqGSIb3DQEB BQUAMIHdMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsT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NVBAYTAlVT MRcwFQYDVQQKEw5W
ZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y azE7MDkGA1UECxMy
VGVybXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEg KGMpMDUxHjAcBgNV
BAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24g Q2xhc3MgMSBJbmRp
dmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMgIQK5ws4fyrLtMyHckTgW39QTAN BgkqhkiG9w0BAQEF
AASBgJ5CIvLgsaTUssK4ikwyvGTAEBMNzxuFJPhuU18izSca3YING/7+Nb/f joWWKd/TiNfeuL60
GfdaU2vyE4KgzOTPYcldOAKNk/ESpQW97bKcHfRD1vOouH4/KNt2YJx3XF97 1eCjyNolB9TIzJQo
YhPi3CwNOQvonlIq46pbHi0tAAAAAAAA

------=_NextPart_000_00BA_01CAC95F.D7811EC0--

Re: Apache 2.2 optimization -> Three tips

am 22.03.2010 09:38:12 von xiazhengxin

thanks for your tips.

Best regards,
Sharl.Jimh.Tsin

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Apache 2.2 optimization -> Three tips

am 22.03.2010 10:21:03 von wrowe

On 3/22/2010 3:34 AM, Geoff Millikan wrote:
> Here's three things I wish I had read about Apache optimization that are not
> commonly discussed (we found out by years of trial and error).

Agreed, agreed, and *huh*?

> 3. Increase your StartServers to the number of maximum requests on your
> biggest page. For example, if your busiest page requires 30 hits/requests
> to load all the images, css, javascript, etc then

It needs to be generously sized, but not users * maxrequests. Just starting
your average server load is correct, e.g. if your server averages 300 simulatious
connections, you need to start with 300 servers, and you never want it to drop
below that number.

Yes, a browser can make multiple connections, but this is typically only two
parallel pipelines, perhaps even four. But 30 workers are not handling the
30 requests comprising one user connecting to your site!!! You just happened
to hit a magic correlation in your testing :)

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Apache 2.2 optimization -> Three tips

am 22.03.2010 11:08:51 von Geoff Millikan

------=_NextPart_000_00F0_01CAC96C.FF2842C0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

> if your server averages 300 simulatious connections, you need
> to start with 300 servers, and you never want it to drop
> below that number.

Your experience might show otherwise however based on our experience - if we
averaged 300 new customers/min at once (not 300 requests/sec) a
MinSpareServers of 300 wouldn't be enough.

> Yes, a browser can make multiple connections, but this is
> typically only two
> parallel pipelines, perhaps even four.

The "average" browser now makes 6 parallel connections per hostname per:
http://www.browserscope.org/

> But 30 workers are not handling the 30 requests comprising
> one user connecting to your site!!! You just happened
> to hit a magic correlation in your testing :)

I agree, the way I understand the prefork model to work, the 30 processes
aren't each serving one of the 30+ requests this Customer's browser made (is
keepalive tracked across processes?). However, the way the testing worked
out for us, it seems that way. We did a lot of testing to come up with our
numbers and just "ball parking" it, the number of servers seemed to work out
best when matched to the number of requests per page.

Don't take my word for it, use Firebug and test it - if you're seeing big
"waiting" bar times and you know you have the bandwidth on both ends (ask
you web host how much burst or max bandwidth you get), then up the
MinSpareServers and see what happens (comment out the MaxSpareServers). For
the record, our site averages ~3 requests per second 24-hours a day and
averages about 35 (ugh, I know) requests per page. Really should be using
CSS sprites to cut down on the number of requests but instead I'm typing
this and pretending I shouldn't be going to bed. ;-)

Best,

http://www.t1shopper.com/

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"The nine most terrifying words in the English language are: I'm from the
government and I'm here to help." - Ronald Reagan, August 21, 1986
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

------=_NextPart_000_00F0_01CAC96C.FF2842C0
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIIL4TCCAj0w
ggGmAhEAzbp/VvDf5LxU/iKss3KqVTANBgkqhkiG9w0BAQIFADBfMQswCQYD VQQGEwJVUzEXMBUG
A1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDEgUHVibGlj IFByaW1hcnkgQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNOTYwMTI5MDAwMDAwWhcNMjgwODAx MjM1OTU5WjBfMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT LkNsYXNzIDEgUHVi
bGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwgZ8wDQYJKoZI hvcNAQEBBQADgY0A
MIGJAoGBAOUZv22jVmEtmUhx9mfeuY3rt56GgAqRDvo4Ja9GiILlc6igmyRd DR/MZW4MsNBWhBiH
mgabEKFz37RYOWtuwfYV1aioP6oSBo0xrH+wNNePNGeICc0UEeJORVZpH3gC gNrcR5EpuzbJY1zF
4Ncth3uhtzKwezC6Ki8xqu6jZ9rbAgMBAAEwDQYJKoZIhvcNAQECBQADgYEA TD+4i8Zo3+5DMw5d
6abLB4RNejP/khv0Nq3YlSI2aBFsfELM85wuxAc/FLAPT/+Qknb54rxK6Y/N oIAK98Up8YIiXbix
3YEjo3slFUYweRb46gVLlH8dwhzI47f0EEA8E8NfH1PoSOSGtHuhNbB7Jbq4 046rPzidADQAmPPR
cZQwggTMMIIDtKADAgECAhArnCzh/Ksu0zIdyROBbf1BMA0GCSqGSIb3DQEB BQUAMIHd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hArnCzh/Ksu0zId
yROBbf1BMIIBBQYLKoZIhvcNAQkQAgsxgfWggfIwgd0xCzAJBgNVBAYTAlVT MRcwFQYDVQQKEw5W
ZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y azE7MDkGA1UECxMy
VGVybXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEg KGMpMDUxHjAcBgNV
BAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24g Q2xhc3MgMSBJbmRp
dmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMgIQK5ws4fyrLtMyHckTgW39QTAN BgkqhkiG9w0BAQEF
AASBgCBCyxKH18RqoHu6vEgipijm6jTEJoSdpkotyKguuv6+ytM+Bdtqn5cH UYhzsKqq9OMckLzY
f8Kf8lj66Q5RCQieUMw6tgTwGtXuJBhxgiJcZR8zxXoptLYeUx25srOjVig8 o9XqL7XKRy3lMAdM
XbhDtWkSvma/R8r9+S1srVzTAAAAAAAA

------=_NextPart_000_00F0_01CAC96C.FF2842C0--

Re: Apache 2.2 optimization -> Three tips

am 22.03.2010 11:53:37 von wrowe

On 3/22/2010 5:08 AM, Geoff Millikan wrote:
>> if your server averages 300 simulatious connections, you need
>> to start with 300 servers, and you never want it to drop
>> below that number.
>
> Your experience might show otherwise however based on our experience - if we
> averaged 300 new customers/min at once (not 300 requests/sec) a
> MinSpareServers of 300 wouldn't be enough.

A connection is not a customer, as we discuss below. I'm using the technical,
networking term connection, and this is what you can observe in mod_status
over a period of time to calculate an average (and min/max).

>> Yes, a browser can make multiple connections, but this is
>> typically only two
>> parallel pipelines, perhaps even four.
>
> The "average" browser now makes 6 parallel connections per hostname per:
> http://www.browserscope.org/

Interesting research, thanks!

>> But 30 workers are not handling the 30 requests comprising
>> one user connecting to your site!!! You just happened
>> to hit a magic correlation in your testing :)
>
> I agree, the way I understand the prefork model to work, the 30 processes
> aren't each serving one of the 30+ requests this Customer's browser made (is
> keepalive tracked across processes?). However, the way the testing worked
> out for us, it seems that way. We did a lot of testing to come up with our
> numbers and just "ball parking" it, the number of servers seemed to work out
> best when matched to the number of requests per page.

Fair enough, but if your testing was of ~30 requests, and we are believing that
the typical browser is making 6 simultaneous connections, then it sounds like
the real magic was 6 * fudge factor of 5 ;-P


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Apache 2.2 optimization -> Three tips

am 22.03.2010 12:37:28 von Nick Kew

On 22 Mar 2010, at 08:34, Geoff Millikan wrote:

> Here's three things I wish I had read about Apache optimization that =
are not
> commonly discussed (we found out by years of trial and error).

Thanks for sharing!

> 1. Set your KeepAliveTimeout to 3 seconds or less.

+1. Isn't that documented? I'm surprised!

> 2. Turn off atime "accesss time" by using noatime.

Interesting! Do you have any insights into how this varies with =
filesystem
and operating system/hardware behaviour? If this comes close to the
difference made by .htaccess, I'd be looking at what lies beneath.

> 3. Increase your StartServers to the number of maximum requests on =
your
> biggest page.

I'm with wrowe on this one: what you're getting is coincidence if =
anything.
Your clients should be using keepalive for objects on a page.
Furthermore, what you describe appears to assume prefork MPM,
which is unlikely to be the best solution where performance is an issue.

> Money and premature optimization is the root of all evil.

:-)

--=20
Nick Kew=

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Apache 2.2 optimization -> Three tips

am 22.03.2010 16:45:20 von Geoff Millikan

------=_NextPart_000_0132_01CAC99C.01393D10
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

> Fair enough, but if your testing was of ~30 requests, and we
> are believing that
> the typical browser is making 6 simultaneous connections,
> then it sounds like
> the real magic was 6 * fudge factor of 5 ;-P

LOL, yes, I totally agree and I kept thinking that no optimization guide has
MinSpareServers and StartServers in the 20ies, 30ies or 40ies so I kept
telling myself that there's no way that the "waiting" issues we saw could be
solved by increasing the Servers. However, we eliminated everything else:
we're on 100Mbit Internet connection in 1 Wilshire, Los Angeles which is one
of the more interconnected buildings in the USA, network optimized (all
hardware Cisco GigE rated), server NIC cards all GigE rated and tuned, file
system optimized (see noatime) and disk buffers optimized on RAID 10, extra
RAM to spare, DNS resolution times tested, etc, etc, etc. We were going
crazy. We started looking into serving content with Lighttpd or Nginx to try
and get around the issue but didn't want to configure/maintain more web
servers so went back to the drawing board with Apache.

Increasing MinSpareServers and StartServers beyond "normal" is what solved
the issue for us.

Although it doesn't make sense it seems 5 or 10 or more servers cannot
*simultaneously* both read 35 files off the server and serve them. Now if
the Client is on dial-up, or mediocre DSL then the extra 500ms to 800ms of
wait time probably wouldn't even be noticed as the last few images streaming
in and the page finishes rendering. But our office is on a 20 Mbps Verizon
fiber link, and many of our customers are on fast pipes. So we really do
notice the difference between a web page that "snaps up to attention" and
one that renders 90% with the last few pieces shuffling around.

Best,

http://www.t1shopper.com/

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"The nine most terrifying words in the English language are: I'm from the
government and I'm here to help." - Ronald Reagan, August 21, 1986
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

------=_NextPart_000_0132_01CAC99C.01393D10
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIIL4TCCAj0w
ggGmAhEAzbp/VvDf5LxU/iKss3KqVTANBgkqhkiG9w0BAQIFADBfMQswCQYD VQQGE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AxMuVmVyaVNpZ24g Q2xhc3MgMSBJbmRp
dmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMgIQK5ws4fyrLtMyHckTgW39QTAN BgkqhkiG9w0BAQEF
AASBgC5ML6kxC9pThOUKPVdwe0i4mvEkuuEmZwTTdujya82kE6FAPDw97ES/ FHOcDmcZYkhL6izi
qtW/JJkkPnA8iyi/M6nRzDp7qJhS5XEnvp/jwsJusZ0M9qyWMZKxgRkGk9MH EC4Ir/vAQg9fXybN
j1wZUARHxV7hrQ5HQqZfV+RHAAAAAAAA

------=_NextPart_000_0132_01CAC99C.01393D10--

Re: Apache 2.2 optimization -> Three tips

am 22.03.2010 16:55:31 von Tom Evans

On Mon, Mar 22, 2010 at 3:45 PM, Geoff Millikan w=
rote:
>> Fair enough, but if your testing was of ~30 requests, and we
>> are believing that
>> the typical browser is making 6 simultaneous connections,
>> then it sounds like
>> the real magic was 6 * fudge factor of 5 ;-P
>
> LOL, yes, I totally agree and I kept thinking that no optimization guide =
has
> MinSpareServers and StartServers in the 20ies, 30ies or 40ies so I kept
> telling myself that there's no way that the "waiting" issues we saw could=
be
> solved by increasing the Servers.  However, we eliminated everything=
else:
> we're on 100Mbit Internet connection in 1 Wilshire, Los Angeles which is =
one
> of the more interconnected buildings in the USA, network optimized (all
> hardware Cisco GigE rated), server NIC cards all GigE rated and tuned, fi=
le
> system optimized (see noatime) and disk buffers optimized on RAID 10, ext=
ra
> RAM to spare, DNS resolution times tested, etc, etc, etc.  We were g=
oing
> crazy. We started looking into serving content with Lighttpd or Nginx to =
try
> and get around the issue but didn't want to configure/maintain more web
> servers so went back to the drawing board with Apache.
>
> Increasing MinSpareServers and StartServers beyond "normal" is what solve=
d
> the issue for us.
>
> Although it doesn't make sense it seems 5 or 10 or more servers cannot
> *simultaneously* both read 35 files off the server and serve them.  =
Now if
> the Client is on dial-up, or mediocre DSL then the extra 500ms to 800ms o=
f
> wait time probably wouldn't even be noticed as the last few images stream=
ing
> in and the page finishes rendering.  But our office is on a 20 Mbps =
Verizon
> fiber link, and many of our customers are on fast pipes.  So we real=
ly do
> notice the difference between a web page that "snaps up to attention" and
> one that renders 90% with the last few pieces shuffling around.
>
> Best,
>
> http://www.t1shopper.com/
>
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> "The nine most terrifying words in the English language are: I'm from the
> government and I'm here to help." - Ronald Reagan, August 21, 1986
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>

Have you considered using a more resource effective MPM, like worker
or event? (disclaimer: I love the event MPM!)

If it is pure static hosting, then worker/event is a no-brainer. For
PHP/Python/etc you simply run the web app out of process and
communicate via WSGI or FastCGI (WSGI if you just do Python, FastCGI
if you prefer to be language agnostic).

Cheers

Tom

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Apache 2.2 optimization -> Three tips

am 22.03.2010 17:09:47 von Geoff Millikan

------=_NextPart_000_0160_01CAC99F.6B7715F0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

> +1. Isn't that documented? I'm surprised!

Suppose so, as a n00b though, I thought maybe cutting the default time of 15
in half would do it. It didn't. With many people on fast Internet
connections now, even 1 or 2 second KeepAliveTimeout's seem to work good.

> Interesting! Do you have any insights into how this varies
> with filesystem and operating system/hardware behaviour?
> If this comes close to the difference made by .htaccess,
> I'd be looking at what lies beneath.

Unfortunately the day we did this we also optimized a bunch of MySQL
queries. That aside, and with the disclaimer that we're total newbies at
file system optimization, we saw was about a 40% decrease in CPU time and (I
have no idea why on this) about 20% more free RAM memory. We're on ext3
filesystem but it would seem like any gain you'd see from noatime would be
impactful on any filesystem but I have no idea. I can say that of all the
tuning we've done to the system, the noatime and the MinSpareServers
produced the most immediate, "I can see a difference with my naked eye" type
results. YMMV. The article below had convincing data which led us to try
it but screwing with our filesystem isn't something we took lightly:
http://www.philchen.com/2009/02/09/some-tuning-tips-for-apac he-mod_cache-mod
_disk_cache

> Furthermore, what you describe appears to assume prefork MPM,
> which is unlikely to be the best solution where performance
> is an issue.

Agreed, from what I've read worker MPM seems better but as you guys may
know, if you want tech support from Red Hat on RHEL5, you're stuck with
prefork. Otherwise it's recompile time (yes, all the books say everything
should be recompiled) and if something goes haywire we're screwed with no
tech support (albeit the tech support from Red Hat hasn't been very helpful
anyway).

------=_NextPart_000_0160_01CAC99F.6B7715F0
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIIL4TCCAj0w
ggGmAhEAzbp/VvDf5LxU/iKss3KqVTANBgkqhkiG9w0BAQIFADBfMQswCQYD VQQGEwJVUzEXMBUG
A1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDEgUHVibGlj IFByaW1hcnkgQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNOTYwMTI5MDAwMDAwWhcNMjgwODAx MjM1OTU5WjBfMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT LkNsYXNzIDEgUHVi
bGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwgZ8wDQYJKoZI hvcNAQEBBQADgY0A
MIGJAoGBAOUZv22jVmEtmUhx9mfeuY3rt56GgAqRDvo4Ja9GiILlc6igmyRd DR/MZW4MsNBWhBiH
mgabEKFz37RYOWtuwfYV1aioP6oSBo0xrH+wNNePNGeICc0UEeJORVZpH3gC gNrcR5EpuzbJY1zF
4Ncth3uhtzKwezC6Ki8xqu6jZ9rbAgMBAAEwDQYJ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